package hr.jpa.dao;

import java.io.Serializable;
import java.util.List;

public interface GenericDAO<T, ID extends Serializable> {

	T find(ID id, boolean lock);

	T find(ID id);

	List<T> findAll();

	List<T> findByExample(T exampleInstance);

	List<T> findByExample(T exampleInstance, String[] excludeProperty);

	T merge(T entity);

	void remove(T entity);

	void refresh(T entity);

	void persist(T entity);

	List<T> executeNamedQueryNP(String queryName, Object... arguments);

	List<T> executeNamedQuery(String queryName, Object... arguments);
}